package com.tedu.crmpx.orders.controller;

import com.tedu.crmpx.base.response.JsonResult;
import com.tedu.crmpx.orders.pojo.vo.ordersVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.tedu.crmpx.orders.service.ordersService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/crm/orders")
public class ordersController {
    @Autowired
    private ordersService ordersService;
    @GetMapping("/load")
    public JsonResult load(){
        log.debug("加载订单信息");
        List<ordersVO> list = ordersService.load();
        return JsonResult.ok(list);
    }
}
